package com.stylefeng.guns.modular.salesmanagement.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.modular.dto.CustomerReturnGoodsAddRequest;
import com.stylefeng.guns.modular.dto.CustomerReturnGoodsQueryRequest;
import com.stylefeng.guns.modular.system.model.CustomerReturn;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author LiuXin
 * @since 2018-09-12
 */
public interface ICustomerReturnService extends IService<CustomerReturn> {

    /**
     * 保存客户退货订单和商品信息
     * @param request 请求
     * @return 返回
     */
    boolean insertCustomerReturnListAndGoods(CustomerReturnGoodsAddRequest request);

    /**
     * 根据客户退货订单id删除 订单和商品
     * @param customerReturnId 订单id
     * @return true false
     */
    boolean deleteCustomerReturnListAndGoods(Long customerReturnId);

    /**
     * 增加数据范围查找
     * @param page 分页
     * @param request 请求
     * @return 结果集
     */
    Page<CustomerReturn> selectPageWithDataScope(Page<CustomerReturn> page, CustomerReturnGoodsQueryRequest request);

}
